﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Dynamics.BusinessConnectorNet;

namespace PJ.Framework.DynamicsAX
{
    public class AxObject : IDisposable
    {
        private AxaptaObject m_AxObject;

        public AxObject(AxaptaObject axObject)
        {
            m_AxObject = axObject;
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool disposable)
        {
            if (m_AxObject != null && disposable)
            {
                m_AxObject.Dispose();
                m_AxObject = null;
            }
        }
    }
}
